import { ObjectDto, ObjectDtoInterface} from "../../../services/sqliteDB/object.dto";
import { TableColumnType } from "../../../services/sqliteDB/object.dto";
import { SyncStatus } from "../../sync-status";

export class InspectionAttachmentsDto extends ObjectDto implements ObjectDtoInterface {

    public id: string = null;                 // 索引列
    public thumbnailId: string = null;        //  缩略图Id
    public attachmentName: string = null;     // 附件名
    public path: string = null;               //  附件路径
    public thumbnailPath: string = null;      // 附件缩略图路径
    public syncStatus: SyncStatus = SyncStatus.None;         // 同步状态：   （0: 从来没上传, 1: 上传成功, 2: 正在上传, 3: 上传失败)


    constructor() {
        super();
    }

    table() {
        return {
            tableName: "InspectionAttachments",
            tableConstructor: {
                id: `${TableColumnType.text} ${TableColumnType.unique}`,
                thumbnailId: TableColumnType.text,
                attachmentName: TableColumnType.text,
                path: TableColumnType.text,
                thumbnailPath: TableColumnType.text,
                syncStatus: TableColumnType.int,
            }
        };
    }

}
